{% extends 'base_with_top_menu.html' %}

{% load go_back_link %}

{% block title %}My rentals{% endblock %}

{% block header %}My rentals{% endblock %}

{% block content %}

{% if display_tips %}
<div class="tip">
  <p>If you want to <em>return a book</em> you have to find you profile via <em>'User list'</em> in the menu. This is only info page. But here is a <a href="/entelib/users/{{user_id}}/rentals/">direct link</a>.</p>
</div>
{% endif %}


    <b>
        {{ first_name }} {{ last_name }}
        <br>
        {{ email|urlize }}
    </b>
    <ul class='spaces'>
        {% for rental in rentals %}
            <li><b>{{ rental.title }}</b>{% block return %}{% endblock %}
                <ul>
                    <li>Authors: {{ rental.authors|join:', ' }}</li>
                    <li>From: {{ rental.from_date }}</li>
                    <li>To: {{ rental.to_date }}</li>
                    <li>Shelf mark: {{ rental.shelf_mark }}</li>
                </ul>
            </li>
        {% empty %}
            <b>No rentals.</b>
        {% endfor %}
    </ul>

<p>{% go_back_link %}</p>
<br/>
{% endblock %}

